﻿#region License
// Copyright 2010 Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using Microsoft.Win32;

namespace MediaWiki.MediaWikiConverter.Utilities.Registry
{
  internal interface IRegistry
  {
    RegistryKeyEx CreateSubKey(RegistryKeyEx rkey, string keyname, bool ignoreWow64);
    RegistryKeyEx OpenSubKey(RegistryKeyEx rkey, string keyName, bool writable, bool ignoreWow64);
    void Flush(RegistryKeyEx rkey);
    void Close(RegistryKeyEx rkey);

    object GetValue(RegistryKeyEx rkey, string name, object defaultValue, RegistryValueOptions options);
    void SetValue(RegistryKeyEx rkey, string name, object value);
    void SetValue(RegistryKeyEx rkey, string name, object value, RegistryValueKind valueKind);

    int SubKeyCount(RegistryKeyEx rkey);
    int ValueCount(RegistryKeyEx rkey);

    void DeleteValue(RegistryKeyEx rkey, string value, bool throwIfMissing);
    void DeleteKey(RegistryKeyEx rkey, string keyName, bool throwIfMissing, bool ignoreWow64);
    string[] GetSubKeyNames(RegistryKeyEx rkey);
    string[] GetValueNames(RegistryKeyEx rkey);
  }
}